﻿using FluentNHibernate.Mapping;

namespace Genesis.Persistence.Mapping
{

    using Genesis.Domain;

    public class RoleMap : ClassMap<Role>
    {

        public RoleMap()
        {

            Id(x => x.Id);
            Map(x => x.Title);
            Map(x => x.Description);
            Map(x => x.MarkupClass);
            Map(x => x.IsAdministrator);
            Map(x => x.IsManager);
            Map(x => x.IsModerator);
            Map(x => x.IsBanned);
            Map(x => x.CanViewBoard);
            Map(x => x.CanViewOfflineBoard);
            Map(x => x.CanViewSignatures);
            Map(x => x.CanViewProfiles);
            Map(x => x.CanUseDirectory);
            Map(x => x.CanUseContact);
            Map(x => x.CanUseSearch);
            Map(x => x.CanBypassQueue);
            Map(x => x.CanPostNewThreads);
            Map(x => x.CanPostNewReplies);
            Map(x => x.CanReplyToOwnThreads);
            Map(x => x.CanReplyToOwnReplies);
            Map(x => x.CanReplyToOthersThreads);
            Map(x => x.CanReplyToOthersReplies);
            Map(x => x.CanEditOwnThreads);
            Map(x => x.CanEditOwnReplies);
            Map(x => x.CanEditOthersThreads);
            Map(x => x.CanEditOthersReplies);
            Map(x => x.CanDeleteOwnThreads);
            Map(x => x.CanDeleteOwnReplies);
            Map(x => x.CanDeleteOthersThreads);
            Map(x => x.CanDeleteOthersReplies);
            Map(x => x.CanMoveOwnThreads);
            Map(x => x.CanMoveOwnReplies);
            Map(x => x.CanMoveOthersThreads);
            Map(x => x.CanMoveOthersReplies);
            Map(x => x.CanCloseOwnThreads);
            Map(x => x.CanCloseOthersThreads);
            Map(x => x.CanOpenOwnThreads);
            Map(x => x.CanOpenOthersThreads);
            HasMany<Mask>(x => x.Masks);
            HasMany<Membership>(x => x.Memberships);

        }

    }

}